# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=gostringsr2
pkgver=1.1.2
pkgrel=7
pkgdesc='Extract strings from a Go binary using radare2.'
arch=('any')
groups=('blackarch' 'blackarch-reversing')
url='https://github.com/CarveSystems/gostringsr2'
license=('MIT')
depends=('python' 'radare2' 'python-r2pipe' 'python-click')
makedepends=('python-setuptools' 'python-pip')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('248f5ae9904b13ceed94a9a242e599a09d3738178f9a13556fb4018d2d0fad914d1ce794641619cd84b92624465f289e548e97cf91003b6e558f100f75a49f41')

build() {
  cd "$pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

